//
//  UILabel+GYExtension.m
//  GoodLuck
//
//  Created by apple on 2018/1/31.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "UILabel+GYExtension.h"

@implementation UILabel (GYExtension)

+ (instancetype)layoutWith:(NSString *)title line:(NSInteger)line textColor:(UIColor *)textColor {
    UILabel *layoutLable = [[UILabel alloc] init];
    layoutLable.translatesAutoresizingMaskIntoConstraints = false;
    layoutLable.textColor = textColor;
    layoutLable.numberOfLines = line;
    layoutLable.lineBreakMode = NSLineBreakByWordWrapping;
    layoutLable.text = title;
    
    return layoutLable;
}

+ (instancetype)layoutLbale:(UIColor *)bgColor {
    UILabel *layoutLable = [[UILabel alloc] init];
    layoutLable.translatesAutoresizingMaskIntoConstraints = false;
    layoutLable.backgroundColor = bgColor;
    
    return layoutLable;
}

+ (instancetype)lableWithFrame:(CGRect)frame title:(NSString *)title aligement:(NSTextAlignment)aligement textColor:(UIColor *)textColor font:(CGFloat)font {
    UILabel *lable = [[UILabel alloc] initWithFrame:frame];
    lable.text = title;
    lable.textAlignment = aligement;
    lable.textColor = textColor;
    lable.font = [UIFont systemFontOfSize:font];
    
    return lable;
}
@end
